<!DOCTYPE html>
<html lang="zh-cn">
<head>
	<meta charset="utf-8">
    <title>使用jQuery Validate实现表单验证</title>
    <script type="text/javascript" src="style/js/jquery-1.11.3.min.js"></script>
    <script type="text/javascript" src="style/js/validate-1.14.0.min.js"></script>
    <script type="text/javascript" src="style/js/formcheck.js"></script>
    <style>
    p span {
        display: inline-block;
        width: 150px;
        text-align: right;
    }
    </style>
</head>
<body>
<form id="register2">
    <p><span>用户名：      </span><input name="username"></p>
    <p><span>密码：        </span><input name="password" id="password"></p>
    <p><span>再次输入密码：</span><input name="password2"></p>
    <p>
        <span>性别：</span>
        <input type="radio" name="sex" value="1" required="true">男
        <input type="radio" name="sex" value="2">女
    </p>
    <p>
        <span>爱好：</span>
        <input type="checkbox" name="favorite" value="1" required="true">唱歌
        <input type="checkbox" name="favorite" value="2">跳舞
        <input type="checkbox" name="favorite" value="3">游泳
    </p>
    <p><span></span><input type="submit">
</form>
<hr>
<form id="register3">
    <p><span>用户名：      </span><input name="username"></p>
    <p></p>
    <p><span>密码：        </span><input name="password" id="password"></p>
    <p></p>
    <p><span>再次输入密码：</span><input name="password2"></p>
    <p></p>
    <p>
        <span>性别：</span>
        <input type="radio" name="sex" value="1" required="true">男
        <input type="radio" name="sex" value="2">女
    </p>
    <p></p>
    <p>
        <span>爱好：</span>
        <input type="checkbox" name="favorite" value="1" required="true">唱歌
        <input type="checkbox" name="favorite" value="2">跳舞
        <input type="checkbox" name="favorite" value="3">游泳
    </p> 
    <p></p>   
    <p><span></span><input type="submit">
</form>
<hr>
<form id="register4">
    <p><span>用户名：      </span><input name="username"></p>
    <p><span>密码：        </span><input name="password" id="password"></p>
    <p><span>再次输入密码：</span><input name="password2"></p>
    <p><span></span><input type="submit"></p>
    <em></em>
</form>
</body>
</html>